package com.suian.spring.test.handler;

import com.suian.spring.test.LogHandler;
import com.suian.spring.test.LogLevel;
import com.suian.spring.test.LogRequest;

public class ErrorLogHandler extends LogHandler {
    public ErrorLogHandler() {
        super(LogLevel.ERROR);
    }

    @Override
    protected void writeLog(LogRequest request) {
        System.out.println("[ERROR] " + request.getMessage());
        // 模拟额外处理：发送报警邮件
        System.out.println(">>> 发送报警邮件: " + request.getMessage());
    }
}
